<extend name="Public/frame" />
<block name="content-box">

    <form class="form-horizontal tpx-ajaxsubmit" role="form" action="{:U(CONTROLLER_NAME.'/'.ACTION_NAME)}" method="post">

        <div class="form-group">
            <label class="col-sm-2 control-label">网站名称</label>
            <div class="col-sm-9">
                <input name="home_name"
                       type="text"
                       class="form-control"
                       placeholder=""
                       value="{$home_name|t_html}"
                        />
                <div class="help-block"></div>
            </div>
        </div>
		
        <div class="form-group">
            <label class="col-sm-2 control-label">伪静态</label>
            <div class="col-sm-9">
                <div class="radio">
                    <label>
                        <input type="radio" name="system_rewrite_enable" value="1" <if condition="$system_rewrite_enable">checked</if> /> 开启
                    </label>
                    &nbsp;&nbsp;&nbsp;&nbsp;
                    <label>
                        <input type="radio" name="system_rewrite_enable" value="0" <if condition="!$system_rewrite_enable">checked</if> /> 关闭
                    </label>
                </div>
            </div>
        </div>
		
        <div class="form-group">
            <label class="col-sm-2 control-label">色调</label>
            <div class="col-sm-9">
                <select name="theme_color"
                        class="form-control"
                        style="width:auto;">
                    <option value="red" <if condition="$theme_color eq 'red'">selected</if>>红色系</option>
                    <option value="blue" <if condition="$theme_color eq 'blue'">selected</if>>蓝色系</option>
                    <option value="green" <if condition="$theme_color eq 'green'">selected</if>>绿色系</option>
                </select>
                <div class="help-block"></div>
            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-2 control-label">Logo</label>
            <div class="col-sm-9">
                <table border="0" style="table-layout:fixed">
                    <tr>
                        <td>
                            <span style="display:inline-block;padding:3px;border:1px solid #CCC;">
                                <img src="{$image_logo}" id="image_logo-preview" style="height:150px;min-width:50px;max-width:400px;background-color: <?php if($theme_color=='red'){echo '#dd1144;';}elseif($theme_color=='green'){echo '#228b22;';}else{echo '#1e90ff;';} ?>" />
                            </span>
                        </td>
                        <td width="20">
                            <input type="hidden" name="image_logo" id="image_logo" value="{$image_logo|t_html}" />
                        </td>
                        <td width="120">
                            <div id="image_logo-box"></div>
                        </td>
                    </tr>
                </table>
                <script type="text/javascript">
                    require(["upload_button"],function(){
                        $("#image_logo-box").UploadButton({
                            value_holder   : "#image_logo",
                            preview_holder : "#image_logo-preview",
                            width 	    : 24,
                            height 	    : 24,
                            postURL     : "{:U('System/uploadhandle?action=uploadbutton&type=image')}",
                            background  : "http://{$Think.server.HTTP_HOST}__ROOT__/asserts/upload_button/upload_24x24.png",
                            acceptExt   : ".png",
                            showLoading : true,
                            showAlert   : false
                        });
                    });
                </script>
                <div class="help-block">尺寸150x50，PNG格式</div>
            </div>
        </div>		
		
        <div class="form-group">
            <label class="col-sm-2 control-label">版权信息</label>
            <div class="col-sm-9">
                <input name="basic_copyright"
                       type="text"
                       class="form-control"
                       placeholder=""
                       value="{$basic_copyright|t_html}"
                        />
                <div class="help-block"></div>
            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-2 control-label">域名备案</label>
            <div class="col-sm-9">
                <input name="domain_no"
                       type="text"
                       class="form-control"
                       placeholder=""
                       value="{$domain_no|t_html}"
                />
                <div class="help-block"></div>
            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-2 control-label">统计代码显示位置</label>
            <div class="col-sm-9">
                <div class="radio">
                    <label>
                        <input type="radio" name="code_counter_position" value="1" <if condition="$code_counter_position">checked</if> /> body
                    </label>
                    &nbsp;&nbsp;&nbsp;&nbsp;
                    <label>
                        <input type="radio" name="code_counter_position" value="0" <if condition="!$code_counter_position">checked</if> /> head
                    </label>
                </div>
                <div class="help-block">统计代码显示的未知，head表示显示在head中，body表示显示在body中</div>
            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-2 control-label">访问统计</label>
            <div class="col-sm-9">
                        <textarea name="code_counter"
                                  class="form-control"
                                  placeholder=""
                                  style="min-height:6em;">{$code_counter|t_html}</textarea>
                <div class="help-block">该段代码将会被添加在body/head中</div>
            </div>
        </div>		
		
        <div class="form-group">
            <div class="col-sm-offset-2 col-sm-10">
                <button type="submit" class="btn btn-primary">{$Think.lang.submit}</button>
            </div>
        </div>

    </form>

</block>